<html>
<head><meta charset="utf-8"><title>Resources for Interpreting rustc profile · t-compiler/wg-self-profile · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/index.html">t-compiler/wg-self-profile</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/Resources.20for.20Interpreting.20rustc.20profile.html">Resources for Interpreting rustc profile</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="201293780"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/Resources%20for%20Interpreting%20rustc%20profile/near/201293780" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> rylev <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/Resources.20for.20Interpreting.20rustc.20profile.html#201293780">(Jun 18 2020 at 16:39)</a>:</h4>
<p>Hey all. I have a crate with long build times. I'm currently profiling using crox, but having a hard time figuring out how tot translate the information I'm getting into action. Are there any resources on how to interpret self profiling data?</p>



<a name="201294277"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/Resources%20for%20Interpreting%20rustc%20profile/near/201294277" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> andjo403 <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/Resources.20for.20Interpreting.20rustc.20profile.html#201294277">(Jun 18 2020 at 16:41)</a>:</h4>
<p>not that I'm aware of it is mostly helpful to find what part of the compiler that is slow not what makes the compiler slow</p>



<a name="201299177"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/Resources%20for%20Interpreting%20rustc%20profile/near/201299177" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/Resources.20for.20Interpreting.20rustc.20profile.html#201299177">(Jun 18 2020 at 17:18)</a>:</h4>
<p><span class="user-mention" data-user-id="224872">@Ryan Levick</span> Yeah, the tool is currently very focused on finding the parts of the compiler that are slow, not the parts of your code that are causing the slowness.</p>



<a name="201299266"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/Resources%20for%20Interpreting%20rustc%20profile/near/201299266" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/Resources.20for.20Interpreting.20rustc.20profile.html#201299266">(Jun 18 2020 at 17:18)</a>:</h4>
<p>I'd recommend watching this issue for updates: <a href="https://github.com/rust-lang/measureme/issues/51">https://github.com/rust-lang/measureme/issues/51</a></p>



<a name="201299514"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/Resources%20for%20Interpreting%20rustc%20profile/near/201299514" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> rylev <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/Resources.20for.20Interpreting.20rustc.20profile.html#201299514">(Jun 18 2020 at 17:20)</a>:</h4>
<p>Makes sense. :-) I'll try to figure out what my next steps should be</p>



<a name="201300107"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/Resources%20for%20Interpreting%20rustc%20profile/near/201300107" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/Resources.20for.20Interpreting.20rustc.20profile.html#201300107">(Jun 18 2020 at 17:26)</a>:</h4>
<p><span class="user-mention" data-user-id="224872">@Ryan Levick</span> Out of curiosity, are you seeing <code>DefId</code>s in the crox output? And if so, is that helpful at all?</p>



<a name="201300178"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/Resources%20for%20Interpreting%20rustc%20profile/near/201300178" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> rylev <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/Resources.20for.20Interpreting.20rustc.20profile.html#201300178">(Jun 18 2020 at 17:26)</a>:</h4>
<p>In the JSON?</p>



<a name="201300192"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/Resources%20for%20Interpreting%20rustc%20profile/near/201300192" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/Resources.20for.20Interpreting.20rustc.20profile.html#201300192">(Jun 18 2020 at 17:26)</a>:</h4>
<p>In the Chrome profiler</p>



<a name="201300209"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/Resources%20for%20Interpreting%20rustc%20profile/near/201300209" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/Resources.20for.20Interpreting.20rustc.20profile.html#201300209">(Jun 18 2020 at 17:26)</a>:</h4>
<p>(Trying to see if I have an example handy)</p>



<a name="201300426"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/Resources%20for%20Interpreting%20rustc%20profile/near/201300426" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> andjo403 <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/Resources.20for.20Interpreting.20rustc.20profile.html#201300426">(Jun 18 2020 at 17:28)</a>:</h4>
<p>you need to add something like "-Z self-profile-events=default,query-keys" to get the DefIds</p>



<a name="201300585"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/Resources%20for%20Interpreting%20rustc%20profile/near/201300585" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> andjo403 <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/Resources.20for.20Interpreting.20rustc.20profile.html#201300585">(Jun 18 2020 at 17:29)</a>:</h4>
<p>if you add that you will have something like in this <a href="https://github.com/rust-lang/measureme/pull/108">https://github.com/rust-lang/measureme/pull/108</a></p>



<a name="201300688"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/Resources%20for%20Interpreting%20rustc%20profile/near/201300688" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/Resources.20for.20Interpreting.20rustc.20profile.html#201300688">(Jun 18 2020 at 17:30)</a>:</h4>
<p>For example, I can see stuff like this: <a href="/user_uploads/4715/kfZqVB1Mz9VdvpgUS07UxlIe/Screen-Shot-2020-06-18-at-1.29.58-PM.png">Screen-Shot-2020-06-18-at-1.29.58-PM.png</a></p>
<div class="message_inline_image"><a href="/user_uploads/4715/kfZqVB1Mz9VdvpgUS07UxlIe/Screen-Shot-2020-06-18-at-1.29.58-PM.png" title="Screen-Shot-2020-06-18-at-1.29.58-PM.png"><img src="/user_uploads/4715/kfZqVB1Mz9VdvpgUS07UxlIe/Screen-Shot-2020-06-18-at-1.29.58-PM.png"></a></div>



<a name="201301069"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/Resources%20for%20Interpreting%20rustc%20profile/near/201301069" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> rylev <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/Resources.20for.20Interpreting.20rustc.20profile.html#201301069">(Jun 18 2020 at 17:33)</a>:</h4>
<p>Yea I have that. That helps.</p>



<a name="201301862"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/Resources%20for%20Interpreting%20rustc%20profile/near/201301862" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/Resources.20for.20Interpreting.20rustc.20profile.html#201301862">(Jun 18 2020 at 17:39)</a>:</h4>
<p>Ok cool</p>



<a name="201301977"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/Resources%20for%20Interpreting%20rustc%20profile/near/201301977" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/Resources.20for.20Interpreting.20rustc.20profile.html#201301977">(Jun 18 2020 at 17:40)</a>:</h4>
<p>My current thinking is that this tool would aggregate based on that data which would probably help a bit but there's usually large chunks of compilation time that we can't blame to that level of granularity.</p>



<a name="201301995"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/Resources%20for%20Interpreting%20rustc%20profile/near/201301995" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/Resources.20for.20Interpreting.20rustc.20profile.html#201301995">(Jun 18 2020 at 17:40)</a>:</h4>
<p>LLVM is pretty much a black box iirc</p>



<a name="204213804"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/Resources%20for%20Interpreting%20rustc%20profile/near/204213804" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/Resources.20for.20Interpreting.20rustc.20profile.html#204213804">(Jul 17 2020 at 14:40)</a>:</h4>
<p>we can get logging out of LLVM and maybe even some callbacks</p>



<a name="204213885"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/Resources%20for%20Interpreting%20rustc%20profile/near/204213885" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/Resources.20for.20Interpreting.20rustc.20profile.html#204213885">(Jul 17 2020 at 14:41)</a>:</h4>
<p>but I haven't looked into how hard it would be to integrate it. cc <span class="user-mention" data-user-id="124289">@Hanna Kruppe</span> <span class="user-mention" data-user-id="123586">@nagisa</span></p>



<a name="204215251"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/Resources%20for%20Interpreting%20rustc%20profile/near/204215251" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/Resources.20for.20Interpreting.20rustc.20profile.html#204215251">(Jul 17 2020 at 14:52)</a>:</h4>
<p>I believe we already have that integration (see <a href="https://github.com/rust-lang/rust/pull/68406">https://github.com/rust-lang/rust/pull/68406</a>) but it requires <code>-Znew-llvm-pass-manager=y</code></p>



<a name="204233762"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/Resources%20for%20Interpreting%20rustc%20profile/near/204233762" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/Resources.20for.20Interpreting.20rustc.20profile.html#204233762">(Jul 17 2020 at 17:21)</a>:</h4>
<p>ah fun</p>



<a name="204268295"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/Resources%20for%20Interpreting%20rustc%20profile/near/204268295" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/Resources.20for.20Interpreting.20rustc.20profile.html#204268295">(Jul 17 2020 at 22:48)</a>:</h4>
<p>very cool</p>



<a name="204268339"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/Resources%20for%20Interpreting%20rustc%20profile/near/204268339" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/Resources.20for.20Interpreting.20rustc.20profile.html#204268339">(Jul 17 2020 at 22:48)</a>:</h4>
<p>though that probably means that we want to figure measureme exploding on super large profiles sooner ^^</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>